package com.ruoyi.system.service.resp;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.RestaurantGoods;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author：liyouxin
 * @date：2023/8/17 15:59
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RestaurantGoodsDTO extends BaseEntity {
	private Long id;
	@Excel(name = "菜品名称", cellType = Excel.ColumnType.STRING)
	private String name;
	@Excel(name = "价格", cellType = Excel.ColumnType.STRING)
	private Integer price;
	@Excel(name = "启用状态", cellType = Excel.ColumnType.STRING)
	private String status;
	private String location;
	private String image;
	@Excel(name = "凉热", cellType = Excel.ColumnType.STRING)
	private String hot;
	@Excel(name = "荤素", cellType = Excel.ColumnType.STRING)
	private String hun;
	@Excel(name = "口味", cellType = Excel.ColumnType.STRING)
	private String taste;
	@Excel(name = "审核状态", cellType = Excel.ColumnType.STRING)
	private String approveStatus;
	private Long approveMissionId;

	public static RestaurantGoodsDTO convertFromDO(RestaurantGoods goods) {
		return RestaurantGoodsDTO.builder()
						.id(goods.getId())
						.name(goods.getName())
						.status(goods.getStatus())
						.location(goods.getLocation())
						.build();
	}
}
